export function getDuration(startTimestamp, endTimestamp) {
    const start = new Date(startTimestamp);
    const end = new Date(endTimestamp);
    const durationInSeconds = Math.floor((end - start) / 1000);
    const hours = Math.floor(durationInSeconds / (60 * 60)) < 10?'0'+Math.floor(durationInSeconds / (60 * 60)):Math.floor(durationInSeconds / (60 * 60))
    const minutes = Math.floor((durationInSeconds % (60 * 60)) / 60) < 10?'0'+Math.floor((durationInSeconds % (60 * 60)) / 60):Math.floor((durationInSeconds % (60 * 60)) / 60);
    const seconds = durationInSeconds % 60 < 10?'0'+durationInSeconds % 60:durationInSeconds % 60;
    return {
        hours,
        minutes,
        seconds
    }
}
